package com.example.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * ClassName:BookDTO
 * Package:com.example.dto
 * User:HP
 * Date:2025/8/26
 * Time:下午8:26
 * Author 周东汉
 * Version 1.0
 * Description:
 */

@Data
public class BookAddDTO implements Serializable {
    /**
     * 书名
     */
    private String title;

    /**
     * 作者
     */
    private String author;

    /**
     * 出版社
     */
    private String publisher;

    /**
     * 出版日期
     */
    private Date publishDate;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 分类ID
     */
    @NotNull(message = "分类ID不能为空")
    private Long categoryId;

    /**
     * 封面图片URL
     */
    private String coverImage;

    /**
     * 所属书架ID
     */
    private Long bookshelfId;

    /**
     * 总数量
     */
    private Integer totalCount;

    /**
     * 0:下架, 1:上架
     */
    private Integer bookStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
